package scuba.DiveBuddy;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.LinearLayout;
import scuba.DiveBuddy.Class.GraphViews;

/**
 * @author Alex Anderson
 * @version 1.0
 * @since {12/03/14}
 */
public class GraphViewerActivity extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_metrics_graph);


        LinearLayout layout = (LinearLayout)findViewById(R.id.metrics_graphview);
        layout.addView(GraphViews.getTotalDiveTimeData(this));
    }


    @Override
    public boolean onOptionsItemSelected(MenuItem item) {

        switch (item.getItemId())
        {
            case R.id.action_done:
                finish(); //close and Kill
                break;

            default:
                break;
        }

        return super.onOptionsItemSelected(item);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.done_actions, menu);
        return super.onCreateOptionsMenu(menu);
    }
}